package com.example.toy.core;

import com.example.toy.ToySystem;
import com.example.toy.core.commit.FsOfflineCommitFactory;
import com.example.toy.core.commit.ToyCommitAbstractFactory;
import com.example.toy.core.lock.FsOfflineLockFactory;
import com.example.toy.core.locker.ToyLockAbstractFactory;

/**
 * FsOfflineFactoryFactory
 *
 * @author shenbing
 * @date 2021/12/22
 */
public class FsOfflineToySystemFactoryFactory implements ToySystemFactoryProducer {

  private final ToySystem toySystem;

  public FsOfflineToySystemFactoryFactory(ToySystem toySystem) {
    this.toySystem = toySystem;
  }

  @Override
  public ToyLockAbstractFactory buildLockFactory() {
    return new FsOfflineLockFactory();
  }

  @Override
  public ToyCommitAbstractFactory buildCommitFactory() {
    return new FsOfflineCommitFactory();
  }
}
